﻿<Window x:Class="SampleWPFApplication.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:help_ui="clr-namespace:Sora.HelpSystem.UI.WPF;assembly=Sora.HelpSystem.UI.WPF"
        Title="MainWindow" Height="450" Width="525">
    <Window.Resources>
        <!-- This object will provide the help document. The source is relative to the current directory. If not found, the source is relative to the directory of the main assembly -->
        <help_ui:HelpDocumentSource x:Key="WindowHelp" Source="SampleHelp.dshelp"/>
    </Window.Resources>
    <StackPanel Margin="4">
        <TextBlock>Bellow is a control displaying a specified page of the help file, directly in the application</TextBlock>
        <TextBlock>A tooltip is also provided for the control, from the Help Document</TextBlock>
        <Border BorderBrush="Black" BorderThickness="1" CornerRadius="2" Margin="4">
            <!-- This control can show help content from a document. The document is linked to a HelpDocumentSource and the uri si defined in CurrentPageUri -->
            <help_ui:HelpContentDisplay Name="helpContent" Document="{Binding Source={StaticResource WindowHelp}, Path=Document}" CurrentPageUri="ds-help://help.document/items/information" Height="100"
                                        ToolTip="{help_ui:HelpText DocumentSource={StaticResource WindowHelp}, PageUri=ds-help://help.document/items}" />
        </Border>
        <TextBlock>You can set any url as a source</TextBlock>
        <TextBlock>The current source is :</TextBlock>
        <TextBlock Text="{Binding ElementName=helpContent, Path=CurrentPageUri}" Margin="10,0,0,0"/>


        <TextBlock>Displaying a web page ... this is possible</TextBlock>
        <Border BorderBrush="Black" BorderThickness="1" CornerRadius="2" Margin="4">
            <!-- You can also include a web content ... -->
            <help_ui:HelpContentDisplay Document="{Binding Source={StaticResource WindowHelp}, Path=Document}" CurrentPageUri="http://www.google.com" Height="100"/>
        </Border>
    </StackPanel>
</Window>
